package com.agent.membership.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 订阅订单实体
 *
 * @author Jeff_Wan
 * @description 存储会员订阅的支付订单信息
 */
@Data
@TableName("subscription_order")
public class SubscriptionOrder {
    /**
     * 雪花ID主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;
    /**
     * 用户ID
     */
    private Long userId;
    /**
     * 关联订阅ID
     */
    private Long subscriptionId;
    /**
     * 订单金额
     */
    private BigDecimal orderAmount;
    /**
     * 支付方式('ASIABILL','PAYPAL')
     */
    private String paymentMethod;
    /**
     * 支付交易ID
     */
    private String transactionId;
    /**
     * 订单状态('PENDING','PAID','FAILED','REFUNDED')
     */
    private String orderStatus;
    /**
     * 支付时间(UTC)
     */
    private LocalDateTime paymentDate;
    /**
     * 创建时间(UTC)
     */
    private LocalDateTime createdAt;
}